﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace YJKArchUtils.ControlUtility.Forms
{
	public partial class PromptForm : System.Windows.Forms.Form
	{
		public bool Flag { get; set; }

		public PromptForm()
		{
			this.InitializeComponent();
		}

		private void PromptForm_Load(object sender, EventArgs e)
		{
			this.Flag = false;
			this.m_operation = PromptForm.Type.None;
		}

		private void btnExitDrawing_Click(object sender, EventArgs e)
		{
			this.Flag = false;
			this.m_operation = PromptForm.Type.Cancel;
			base.Close();
		}

		private void btnContinue_Click(object sender, EventArgs e)
		{
			this.Flag = true;
			this.m_operation = PromptForm.Type.OK;
			base.Close();
		}

		private void PromptForm_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				base.Close();
			}
		}

		public PromptForm.Type m_operation;

		public enum Type
		{
			None = 1,
			OK,
			Cancel
		}
	}
}
